Skip to content

Conversation

@gentslava
Copy link

@gentslava gentslava commented Feb 18, 2024

Feature - Docker container

  • Добавил Dockerfile
  • Использование Alpine
  • Добавил GHA workflow для билда Docker образа и загрузки в хаб
  • Добавил инструкцию по запуску Docker контейнера
  • Использование apt, вместо apt-get (описание)
  • Правки Readme

Связан с Issue #2

@gentslava gentslava mentioned this pull request Feb 18, 2024
@shrralis
Copy link

shrralis commented Apr 29, 2024

I was playing with this a bit and achieved a smaller Docker image size with this version of Dockerfile (the reason is, I'm using alpine instead of ubuntu):

### BUILD JACRED MULTIARCH START ###
FROM --platform=$BUILDPLATFORM alpine AS builder

WORKDIR /opt/src

# Get and unpack JacRed
RUN apk add --update bash wget unzip
RUN wget https://github.com/immisterio/jacred-fdb/releases/latest/download/publish.zip
RUN unzip -o publish.zip
RUN rm -f publish.zip
### BUILD JACRED MULTIARCH END ###


# ### BUILD MAIN IMAGE START ###
FROM alpine

ENV JACRED_HOME=/home/jacred

COPY --from=builder ./opt/src $JACRED_HOME/

RUN apk add --no-cache --update aspnetcore6-runtime

WORKDIR $JACRED_HOME

EXPOSE 9117
VOLUME ["$JACRED_HOME"]
ENTRYPOINT ["dotnet", "JacRed.dll"]
### BUILD MAIN IMAGE end ###

@gentslava
Copy link
Author

gentslava commented May 1, 2024

@shrralis changed to Alpine image.
Image build and deploy speed increased 25x 🚀

@gentslava gentslava force-pushed the feature/docker-container branch from 9ca3864 to ba58de1 Compare June 3, 2024 13:55
@gentslava gentslava force-pushed the feature/docker-container branch from 9169a2e to fd5b451 Compare June 3, 2024 14:02
@gentslava gentslava force-pushed the feature/docker-container branch from 0b37d62 to 60bf605 Compare February 1, 2025 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants